
/*
 * Copyright 2002-2019 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*
 *版权所有2002-2019原作者。
 *
 *根据Apache许可证2.0版（“许可证”）许可；
 *除非符合许可证的规定，否则您不得使用此文件。
 *您可以在以下网址获取许可证副本
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 *除非适用法律要求或书面同意，否则软件
 *根据许可证分发是在“按原样”的基础上分发的，
 *无任何明示或暗示的保证或条件。
 *有关管理权限的特定语言，请参阅许可证
 *许可证下的限制。
 */

package org.springframework.context.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Indicates one or more <em>component classes</em> to import &mdash; typically
 * {@link Configuration @Configuration} classes.
 *
 * <p>Provides functionality equivalent to the {@code <import/>} element in Spring XML.
 * Allows for importing {@code @Configuration} classes, {@link ImportSelector} and
 * {@link ImportBeanDefinitionRegistrar} implementations, as well as regular component
 * classes (as of 4.2; analogous to {@link AnnotationConfigApplicationContext#register}).
 *
 * <p>{@code @Bean} definitions declared in imported {@code @Configuration} classes should be
 * accessed by using {@link org.springframework.beans.factory.annotation.Autowired @Autowired}
 * injection. Either the bean itself can be autowired, or the configuration class instance
 * declaring the bean can be autowired. The latter approach allows for explicit, IDE-friendly
 * navigation between {@code @Configuration} class methods.
 *
 * <p>May be declared at the class level or as a meta-annotation.
 *
 * <p>If XML or other non-{@code @Configuration} bean definition resources need to be
 * imported, use the {@link ImportResource @ImportResource} annotation instead.
 *
 * @author Chris Beams
 * @author Juergen Hoeller
 * @since 3.0
 * @see Configuration
 * @see ImportSelector
 * @see ImportBeanDefinitionRegistrar
 * @see ImportResource
 */
/**
 *指示要导入的一个或多个<em>组件类</em>&mdash；典型的
 *｛@link配置@配置｝类。
 *
 *＜p＞提供与Spring XML中的｛@code＜import/＞｝元素等效的功能。
 *允许导入｛@code@Configuration｝类、｛@link ImportSelector｝和
 *｛@link ImportBeanDefinitionRegistrar｝实现，以及常规组件
 *类（从4.2开始；类似于{@link AnnotationConfigApplicationContext#register}）。
 *
 *＜p＞在导入的｛@code@Configuration｝类中声明的｛@code@Bean｝定义应该是
 *使用{@link org.springframework.beans.factory.annotation.Autowired@Autowired}访问
 *注射。bean本身可以是自动连接的，也可以是配置类实例
 *声明bean可以是自动连接的。后一种方法允许显式、IDE友好
 *｛@code@Configuration｝类方法之间的导航。
 *
 *＜p＞可以在类级别声明，也可以作为元注释声明。
 *
 *＜p＞如果XML或其他非｛@code@Configuration｝bean定义资源需要
 *已导入，请改用｛@link ImportResource@ImportResource｝注释。
 *
 *@作者Chris Beams
 *@作者Juergen Hoeller
 *@自3.0起
 *@请参阅配置
 *@参见ImportSelector
 *@see ImportBeanDefinition注册器
 *@请参阅ImportResource
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Import {

	/**
	 * {@link Configuration @Configuration}, {@link ImportSelector},
	 * {@link ImportBeanDefinitionRegistrar}, or regular component classes to import.
	 */
	/**
	 *｛@link Configuration@Configuration｝，｛@linkImportSelector｝，
	 *｛@link ImportBeanDefinitionRegistrar｝，或要导入的常规组件类。
	 */
	Class<?>[] value();

}
